As one of methods for backing up data in a storage product or a computer, there is a technique called “copy-on-write”. According to the copy-on-write, not at a time point when a snapshot is generated but at a time point when data is requested to be written into a copy source volume, the data before writing, which is located in a part of the copy source volume that has been requested for is backed up to a copy destination volume.
In addition, as a backup technique extending the copy-on-write, there is a technique for performing generation management of a part (target area) for which writing has been requested by using a copy bit map. The copy bit map is used for managing, for each generation, whether or not data of a target area of the copy source volume has been copied to the copy destination volume.
FIG. 16 is a diagram that illustrates the data structure of a conventional copy bit map. As illustrated in FIG. 16, the copy bit map stores for each generation whether or not the data of each target area has been copied to the copy destination volume. In FIG. 16, “0” is a bit value representing that the data of the target area is present in a corresponding storage area of a copy destination volume. On the other hand, “1” is a bit value representing that the data of the target area is not present in a corresponding storage area of a copy destination volume.
With regard to the conventional techniques, please see Japanese Laid-open Patent Publication No. 2010-26939, Japanese Laid-open Patent Publication No. 2004-199711, Japanese Laid-open Patent Publication No. 2002-373093, and Japanese Laid-open Patent Publication No. 2010-238009, for example.
However, according to the copy-on-write, since a copy bit map for each generation is secured in memory every time the number of backup generations is increased, there may be cases where the copy bit map is not secured due to a shortage of the memory capacity, and the number of generations is not increased. In consideration of a case where the number of generations is not increased due to a shortage of the memory capacity, the copy bit map may be arranged in a disk.
However, in the copy-on-write, in a case where a conventional copy bit map is arranged in a disk, when the number of backup generations is increased, there are cases where the performance deteriorates. For example, in a case where a process of reading data of a target area of a specific generation into a copy destination volume is performed, there are cases where it takes a time for the reading process. FIG. 17 is a diagram that illustrates a conventional reading process for a copy destination volume.
First, in the reading process, when a storage device receives a read request, for example, from a host in Step S101, the storage device reads a copy bit map of a target generation as a reading target in Step S102. Then, the storage device determines in Step S103 whether a bit corresponding to the target area is 0 (presence of data) by using the read copy bit map.
Then, in a case where the target bit is determined to be 0 (Yes in Step S103), the storage device converts the target area corresponding to the target bit into a physical address and reads data of the target generation from the converted physical address in Step S104. On the other hand, in a case where the target bit is determined not to be 0 (No in Step S103), the storage device determines whether or not the generation being processed is a latest generation in Step S105. In a case where the generation being processed is determined not to be the latest generation (No in Step S105), the storage device reads a copy bit map of the next generation in Step S106, and the process proceeds to Step S103 so as to determine the presence of data of the target area.
On the other hand, in a case where the generation being processed is determined to be the latest generation (Yes in Step S105), the storage device reads the data of the target area of the copy source volume in Step S107. When the data of the target area is read in Step S104 or Step S107, the storage device transmits the data to the host in Step S108.
As above, in a case where data corresponding to the target area is not present for the generation as the reading target, the storage device repeatedly reads the copy bit map of a generation other than the generation from a disk and determines whether or not the data is present. As a result, in a case where the number of times of reading the copy bit maps of different generations increases, the performance deteriorates.